package com.guide.ultimate.controller;

import com.guide.ultimate.dto.resp.TrainStationQueryRespDTO;
import com.guide.ultimate.global.Result.Result;
import com.guide.ultimate.global.config.ResultConstructor;
import com.guide.ultimate.service.define.TrainStationService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
public class TrainStaionController {
    @Autowired
    private TrainStationService trainStationService;

    @GetMapping("/utlimate/ticket-service/train-station/query/{trainId}")
    public Result<List<TrainStationQueryRespDTO>> listTrainStationQuery(@PathVariable String trainId) {
        return ResultConstructor.success(trainStationService.listTrainStationQuery(trainId));
    }


}
